package com.itheima.controller;

import com.itheima.common.R;
import com.itheima.service.DishClientService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author wuyiqiang
 * @2022/6/18 15:47
 */
@RestController
@RequestMapping(value = "/dish", produces = "application/json;charset=utf-8")
public class DishClientController {

    @Autowired
    private DishClientService dishClientService;

    /**
     * 根据类别查询菜品信息
     * @param categoryId
     * @param status
     * @return
     */
    @GetMapping("/list")
    public R select(@Param("categoryId") String categoryId, @Param("status") Integer status) {
        System.out.println(categoryId+"========================controller");
        return dishClientService.selectAll(categoryId, status);
    }

}
